﻿/**
 *
 * @file FITKAbaqusHDF5AdaptorDashpotPoint2Point.h
 * @brief 读写HDF5文件的DashpotPoint2Point类
 * @author fulipeng (fulipengqd@yeah.net)
 * @date 2024-06-21
 *
 */
#ifndef  _FITKABAQUSHDF5ADAPTORDASHPOTPOINT2POINT_H__
#define  _FITKABAQUSHDF5ADAPTORDASHPOTPOINT2POINT_H__

#include "FITKAbaqusIOHDF5API.h"
#include "FITKAbaqusHDF5AdaptorAbaWire.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

 //前置声明
ForwardDeclarNS(Interface, FITKAbaAbstractSpringDashpot)

namespace IO
{
    /**
     * @brief HDF5 DashpotPoint2Point 读写适配器
     * @author fulipeng (fulipengqd@yeah.net)
     * @date 2024-06-21
     */
    class FITKABAQUSIOHDF5API FITKAbaqusHDF5AdaptorDashpotPoint2Point : public FITKAbaqusHDF5AdaptorAbaWire
    {
    public:
        explicit FITKAbaqusHDF5AdaptorDashpotPoint2Point() = default;
        virtual ~FITKAbaqusHDF5AdaptorDashpotPoint2Point() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        bool adaptW() override;

        /**
         * @brief 读取弹簧
         * @param coor 坐标系抽象结构
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        bool readDashpot(Interface::FITKAbaAbstractSpringDashpot* sd, H5::Group& h5Group);

        /**
         * @brief 读取点对点弹簧
         * @param coor 坐标系抽象结构
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        bool readDashpotPoint2Point(Interface::FITKAbaAbstractSpringDashpot* sd, H5::Group& h5Group);

        /**
         * @brief 写出弹簧
         * @param coor 坐标系抽象结构
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        bool writeDashpot(Interface::FITKAbaAbstractSpringDashpot* sd, H5::Group& h5Group);

        /**
         * @brief 写出点对点弹簧
         * @param coor 坐标系抽象结构
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-21
         */
        bool writeDashpotPoint2Point(Interface::FITKAbaAbstractSpringDashpot* sd, H5::Group& h5Group);

    };

    Register2FITKIOAdaptorFactory(HDF5, Interface::FITKAbaAbstractSpringDashpot, FITKAbaqusHDF5AdaptorDashpotPoint2Point)

}

#endif
